package com.java46.front.payMethod.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "paymethod", schema = "dessertdb", catalog = "")
public class PaymethodEntity {
    private int payMethodId;
    private String payMethodName;
    private String payMethodMark;

    @Id
    @Column(name = "payMethodId")
    public int getPayMethodId() {
        return payMethodId;
    }

    public void setPayMethodId(int payMethodId) {
        this.payMethodId = payMethodId;
    }

    @Basic
    @Column(name = "payMethodName")
    public String getPayMethodName() {
        return payMethodName;
    }

    public void setPayMethodName(String payMethodName) {
        this.payMethodName = payMethodName;
    }

    @Basic
    @Column(name = "payMethodMark")
    public String getPayMethodMark() {
        return payMethodMark;
    }

    public void setPayMethodMark(String payMethodMark) {
        this.payMethodMark = payMethodMark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PaymethodEntity that = (PaymethodEntity) o;
        return payMethodId == that.payMethodId &&
                Objects.equals(payMethodName, that.payMethodName) &&
                Objects.equals(payMethodMark, that.payMethodMark);
    }

    @Override
    public int hashCode() {

        return Objects.hash(payMethodId, payMethodName, payMethodMark);
    }
}
